<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="/Public/css/bootstrap.min.css" rel="stylesheet">
    <script src="/Public/js/bootstrap.min.js"></script>
</head>
<body>
<div class="main">
    <div class="modal-dialog" style="width:450px;">
        <div class="modal-content">
            <div class="modal-header">
                <button class="close" data-dismiss="modal">&times;</button>
                <span class="glyphicon glyphicon-user"></span><span>注册ATM</span>
            </div>
            <form class="form-horizontal" action="/index.php/Kirito/f" method="post">
                <div class="modal-body">
                    <?php if(!empty($mss)){ ?>
            <div class="alert  alert-danger">注意！！<?php echo ($mss); ?><button class="close" data-dismiss="alert">&times;</button></div>
                    <?php } ?>
                    <?php if(!empty($ms)){ ?>
                    <div class="alert  alert-success">恭喜！！<?php echo ($ms); ?><button class="close" data-dismiss="alert">&times;</button></div>
                    <?php } ?>
                    <div class="form-group">
                        <label class="control-label col-xs-2">账号</label>
                        <div class="col-xs-9">
                            <div class="input-group">
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-user"></span>
                                </span>
                                <input type="text" class="form-control" required="required" name="login">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-2">密&nbsp;&nbsp;&nbsp;&nbsp;码</label>
                        <div class="col-xs-9">
                            <div class="input-group">
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-lock"></span>
                                </span>
                                <input type="password" class="form-control" required="required" name="psw">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="button" class="btn btn-success" value="返回">
                    <button type="submit" class="btn btn-warning">确定</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="/Public/js/jquery-1.11.1.min.js"></script>
<script>
    var maindiv = $('.main');
    $('input[value="返回"]').click(function(){
        $.ajax({
            url:'index.html',
            success:function (resp){
                maindiv.html(resp);
            },
            error:function(xhr,e){
                console.log(e);
            }
        });
    });
</script>
</body>
</html>